﻿<div class="row">
    <h4 class="page-header text-info">
        系统管理日志
    </h4>
    <form class="form-horizontal">
        <div class="col-lg-1 clear-padding">
            <select ng-model="type" class="form-control">
                <option value="">所有相关</option>
                <option value="1">新增操作</option>
                <option value="2">修改操作</option>
                <option value="2">删除操作</option>
            </select>
        </div>
        <div class="col-lg-3 clear-padding">
            <div ce-enter="search" class="input-group">
                <input type="text" class="form-control" ng-model="Name">
                <span class="input-group-btn">
                    <button class="btn btn-default" ng-click="search(false)" type="button">搜索</button>
                </span>
            </div>
        </div>
    </form>
</div>
<div class="row">
    <table class="table table-hover table-bordered">
        <thead>
            <tr>
                <th class="col-sm-1">操作时间</th>
                <th class="col-sm-1">管理员</th>
                <th class="col-sm-1">身份</th>
                <th class="col-sm-1">操作类型</th>
                <th class="col-sm-3">操作描述</th>
            </tr>
        </thead>
        <tbody ng-if="!loadingState">
            <tr ng-repeat="item in list">
                <td>{{item.EventTime|date:'yyyy-MM-dd hh:mm:ss'}}</td>
                <td>{{item.AdminName}}</td>
                <td>{{item.PrivilegeLevel|enumVals:'AdminLevel'}}</td>
                <td>{{item.EventType|enumVals:'EventType'}}</td>
                <td>{{item.Message}}</td>
            </tr>
        </tbody>
        <tbody ng-if="loadingState">
            <tr>
                <td colspan="8" class="text-center">
                    <img width="60" src="/App/images/loading.gif" />
                </td>
            </tr>
        </tbody>
        <tfoot ng-show="!loadingState">
            <tr>
                <td colspan="8">
                    <div class="pull-right">
                        <div class="pagination-info">
                            <span class="ng-binding">共有{{total}}条</span>
                            <div class="pagination-info">
                                <select ng-model="pageTotal" class="form-control" ng-change="search(true)">
                                    <option value="5">5条/页</option>
                                    <option value="10">10条/页</option>
                                    <option value="">20条/页</option>
                                    <option value="30">30条/页</option>
                                </select>
                            </div>
                        </div>
                        <div class="pagination-info form-group-sm">跳至<input type="text" class="input-group-sm" ng-model="current" ng-change="search(true)" />页</div>
                        <uib-pagination boundary-links="true" total-items="total" ng-model="current" max-size="10" ng-change="search(true)" items-per-page="pageTotal||10"
                                        class="pagination-sm" previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"></uib-pagination>
                    </div>
                </td>
            </tr>
        </tfoot>
    </table>
</div>